﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace Himp.TaskScheduling
{
    /// <summary>
    /// 参数配置任务
    /// </summary>
    public class ParamConfigTask : Entity<long>
    {
        /// <summary>
        /// 任务内容描述
        /// </summary>
        public string TaskContdesc { get; set; }

        /// <summary>
        /// 属性Key
        /// </summary>
        public string PropertyKey { get; set; }

        /// <summary>
        /// 属性值
        /// </summary>
        public string PropertyValue { get; set; }

        /// <summary>
        /// 任务类别
        /// 0 手工参数修改
        /// 1 大屏操作修改
        /// </summary>
        public int TaskType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string OperatorName { get; set; }

        /// <summary>
        /// 0 创建
        /// 9 完成
        /// </summary>
        public int TaskStas { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string TaskMsg { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime OperationTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime? ExecTime { get; set; }

        public ParamConfigTask()
        { 
            
        }

        public ParamConfigTask(int taskType,string propertyValue
            ,string operatorName)
        { 
            PropertyValue = propertyValue;
            TaskType = taskType;
            OperatorName = operatorName;
            TaskMsg = "-";
            OperationTime = DateTime.Now;
        }

        public void SetPropertyKey(string propertyKey)
        {
            PropertyKey = propertyKey;
        }
    }
}
